package com.huahai.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.huahai.pojo.entity.User;
import com.huahai.pojo.entity.UserFollow;
import com.huahai.pojo.vo.UserFollowVO;

/**
* @author 29095
* @description 针对表【user_follow(用户好友关系表)】的数据库操作Service
 *
 * 用户好友关系表接口
*/
public interface UserFollowService extends IService<UserFollow> {

    /**
     * 关注用户
     * @param userId
     * @param followId
     * @return
     */
    Boolean addFollow(Long userId, Long followId);

    /**
     * 取消关注
     * @param userId
     * @param followId
     * @return
     */
    boolean removeFollow(Long userId, Long followId);

    /**
     * 获取用户好友列表信息
     * @param loginUser
     * @return
     */
    UserFollowVO listUserFollows(User loginUser);

    /**
     * 判断是否已关注
     * @param userId
     * @param followId
     * @return
     */
    boolean isUserFollowed(Long userId, Long followId);
}
